
#ifndef NATIVE_CAMERA_DEMO_LOG_PRINT_H
#define NATIVE_CAMERA_DEMO_LOG_PRINT_H

#include "hilog/log.h"

static constexpr const char* LOG_PRINT_TAG = "NATIVE_CAMERA_DEMO";
const unsigned int GLOBAL_DOMAIN = 0xFF0D;

#define LOGD(fmt, ...)                                                        \
    do {                                                                      \
        ((void)OH_LOG_Print(LOG_APP, LOG_DEBUG, GLOBAL_DOMAIN, LOG_PRINT_TAG, \
            fmt, ##__VA_ARGS__));                                             \
    } while (0)

#define LOGI(fmt, ...)                                                        \
    do {                                                                      \
        ((void)OH_LOG_Print(LOG_APP, LOG_INFO, GLOBAL_DOMAIN, LOG_PRINT_TAG,  \
            fmt, ##__VA_ARGS__));                                             \
    } while (0)

#define LOGW(fmt, ...)                                                        \
    do {                                                                      \
        ((void)OH_LOG_Print(LOG_APP, LOG_WARN, GLOBAL_DOMAIN, LOG_PRINT_TAG,  \
            fmt, ##__VA_ARGS__));                                             \
    } while (0)

#define LOGE(fmt, ...)                                                        \
    do {                                                                      \
        ((void)OH_LOG_Print(LOG_APP, LOG_ERROR, GLOBAL_DOMAIN, LOG_PRINT_TAG, \
            fmt, ##__VA_ARGS__));                                             \
    } while (0)

#endif //NATIVE_CAMERA_DEMO_LOG_PRINT_H
